<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <script type="text/javascript" src="../assets/js/vue.2.0.1.js"></script>
</head>

<body>
    <h2>v-model 双向数据绑定</h2>
    <div id="app">

        <h3>我爱吃的菜（多选按钮框组）</h3>
        <div>
            <input type="checkbox" value="青菜" v-model="foods">青菜
        </div>

        <div>
            <input type="checkbox" value="鸡肉" v-model="foods">鸡肉
        </div>
        <div>
            <input type="checkbox" value="牛肉" v-model="foods">牛肉
        </div>
        <div>{{foods}}</div>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                foods: [],
            }
        })
    </script>
</body>

</html>